<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 14318
  Date: 2021/12/4
  Time: 12:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
欢迎管理员：${Master_name}登录双子陪玩平台<br/><br/>




<form action="${pageContext.request.contextPath}/user_list" method="get">

    用户名称：<input type="text" name="username" value="${params.username}">


    用户性别：<input type="text" name="gender" value="${params.gender}">

<%--    年龄：<input type="text" name="age" value="${params.age}">--%>

    <input type="submit" value="搜索">

    <a href="${pageContext.request.contextPath }/to_apply_list?Master_name=${Master_name}">申请列表</a>
</form>
<table>
    <tr>
        <th>编号</th>
        <th>用户名称</th>
        <th>用户密码</th>
        <th>用户年龄</th>
        <th>用户性别</th>
    </tr>
    <c:forEach items="${pageData.list}" var="user_list">
        <tr>
            <td>${user_list.code}</td>
            <td>${user_list.username}</td>
            <td>${user_list.password}</td>
            <td>${user_list.age}</td>
            <td>${user_list.gender}</td>
        </tr>
    </c:forEach>
    <tr>
        <td class="td2">
            <span>第${pageData.currPage}/ ${pageData.totalPage}页</span>
            <span>总记录数：${pageData.totalCount } 每页显示: ${pageData.pageSize}</span>
            <span>
              <c:if test="${pageData.currPage != 1}">
                  <a href="${pageContext.request.contextPath }/user_list?currentPage=1">[首页]</a>
                  <a href="${pageContext.request.contextPath }/user_list?currentPage=${pageData.currPage-1}">[上一页]</a>
              </c:if>
                <c:if test="${pageData.currPage != pageData.totalPage}">
                    <a href="${pageContext.request.contextPath }/user_list?currentPage=${pageData.currPage+1}">[下一页]</a>
                    <a href="${pageContext.request.contextPath }/user_list?currentPage=${pageData.totalPage}">[尾页]</a>
                </c:if>
            </span>
        </td>
    </tr>
</table>


</body>
</html>
